package com.zx.onlineeducation.service.edu.service;

import com.zx.onlineeducation.service.edu.entity.ChapterDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zx.onlineeducation.service.edu.entity.vo.ChapterTreeVO;

import java.util.List;

/**
 * <p>
 * 章节 服务类
 * </p>
 *
 * @author 郑雪
 * @since 2022-01-13
 */
public interface ChapterService extends IService<ChapterDO> {

    /**
     * 获取课程章节树形结构数据列表
     *
     * @param courseId 课程ID
     * @return ChapterTreeVO对象的List集合 {@link ChapterTreeVO}
     * @author 郑雪
     * @since 2022-01-14
     */
    List<ChapterTreeVO> getTree(String courseId);

    /**
     * 删除课程章节
     *
     * @param id 章节ID
     * @return 成功true，失败false
     * @author 郑雪
     * @since 2022-01-15
     */
    boolean removeChapterById(String id);
}
